# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=perl-net-dns-lite
_pkgname=Net-DNS-Lite
pkgver=0.12
pkgrel=11
pkgdesc='A pure-perl DNS resolver with support for timeout.'
arch=('any')
license=('PerlArtistic')
options=('!emptydirs')
depends=('perl')
makedepends=('perl-module-install')
url='https://metacpan.org/pod/Net::DNS::Lite'
source=("http://search.cpan.org/CPAN/authors/id/K/KA/KAZUHO/$_pkgname-$pkgver.tar.gz")
sha512sums=('67053da9151220c0e6d1c04b19fb14f10fda3f245eb0d7795f0a0bae10157a9bdcb21de66853d65c69fd3c9b032c26b365f29e5331ecb25c8c7052ec2a2fe35e')

build() {
  cd "$_pkgname-$pkgver"

  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL="--skipdeps" \
    PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'" \
    PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \
    MODULEBUILDRC=/dev/null

  perl Makefile.PL
}

package() {
  cd "$_pkgname-$pkgver"

  make DESTDIR="$pkgdir" install
}

